﻿using System;
using System.Data;
using System.Linq;
using System.Text;
using System.Data.Objects;
using System.ComponentModel;
using System.Data.EntityClient;
using System.Collections.Generic;
using System.Data.Objects.Internal;
using System.Data.Objects.DataClasses;
using System.Reflection;
using System.Collections.ObjectModel;
using System.Collections;
using EntityModel;
using Common;

namespace DataAccess
{
    public abstract class RetrieveHelperBase<T, U> : DataAccessBase
        where T : EntityBase, new()
        where U : UserModel
    {
        public RetrieveHelperBase()
            : base() { }

        public abstract T GetByKey(Int32 key, U userInfo);
        public abstract List<T> GetAll();
        public abstract List<T> Search(T entity);
        public abstract Result<T> GetAllPaging(string sortCol, SORT_ORDER sortOrder, Int16 currentPage, Int16 pageNumber);
        public abstract Result<T> GetAllPaging(Func<T, bool> whereExpression, string sortCol, SORT_ORDER sortOrder, Int16 currentPage, Int16 pageNumber);
        public abstract Result<T> GetComplexPaging(IQueryable<T> source, string sortCol, SORT_ORDER sortOrder, Int16 currentPage, Int16 pageNumber);
    }
}
